<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>

    </style>
</head>
<body>
    <input type="button" value="开始" id="btn">
</body>
<script>

    const btn = document.getElementById("btn");

    const type = {
        start: Symbol(0),
        stop: Symbol(0)
    }

    let a = type.start;

    btn.onclick = function () {
        if (a === type.start) {
            this.value = "暂停";
            a = type.stop;
        } else {
            this.value = "开始";
            a = type.start;
        }
    }

</script>
</html>